cmake_minimum_required(VERSION 3.0.2)
project(my_package)

# # 查找 catkin 依赖
find_package(catkin REQUIRED COMPONENTS
  roscpp
  rospy
  std_msgs
  custom_msgs
)

# # 声明 catkin 包
catkin_package()

# # 指定包含目录
include_directories(
  ${catkin_INCLUDE_DIRS}
)

# # 添加可执行节点
add_executable(my_node src/my_node.cpp)
target_link_libraries(my_node
  ${catkin_LIBRARIES}
)

add_executable(test_service_server src/test_service_server.cpp)
target_link_libraries(test_service_server
  ${catkin_LIBRARIES}
)

add_executable(test_service_client src/test_service_client.cpp)
target_link_libraries(test_service_client
  ${catkin_LIBRARIES}
)

catkin_install_python(PROGRAMS src/my_node.py DESTINATION
  ${CATKIN_PACKAGE_BIN_DESTINATION})

# # 可选：如果节点依赖额外的库（如 PCL、OpenCV），可以在这里添加
# find_package(PCL REQUIRED)
# include_directories(${PCL_INCLUDE_DIRS})
# target_link_libraries(my_node2 ${PCL_LIBRARIES})